/*@ File Name : dynamicarray.h
  @ Date : 18/11/2011
  @ Author : Guillaume Collombet, Ulysse Mensa, Sylvain Chambe

Fireworks simulation projet
Copyright (C) 2011 Guillaume Collombet, Ulysse Mensa, Sylvain Chambe

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

You can contact us by sending mail at fireworks-simulation-project@googlecode.com*/

#if !defined(_DYNAMICARRAY_H)
#define _DYNAMICARRAY_H

#include "const.h"
#include "type.h"

#include <assert.h>
#include <malloc.h>

struct s_DynamicArray
{
	Type32* array;
	TYPE type;
	int lenght;
	int reserved;
} typedef DynamicArray;

void DynamicArray_Init(DynamicArray* dyn,TYPE type);
void DynamicArray_Add(DynamicArray* dyn, Type32 element);
BOOL DynamicArray_Search(const DynamicArray* dyn, Type32 element);
void DynamicArray_Remove(DynamicArray* dyn, Type32 element);
void DynamicArray_RemoveAt(DynamicArray* dyn, int index);
void DynamicArray_Destroy(DynamicArray* dyn);

#endif /*_DYNAMICARRAY_H*/
